package ncme.auto.framework.core.mapper.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import ncme.auto.framework.core.mapper.methods.SelectSingleField;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CustomDefinedSqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {

        List<AbstractMethod> methodList = super.getMethodList(mapperClass);//保留原来的
        methodList.add(new SelectSingleField());    //添加自定义Method

        return methodList;
    }
}
